package org.codeart.status.example03;

public class GreenState implements State {

    @Override
    public void switchToGreen(TrafficLight light) {
        System.out.println("当前是绿灯, 无需切换");
    }

    @Override
    public void switchToYellow(TrafficLight light) {
        System.out.println("黄灯亮起, 时长: 3s");
    }

    @Override
    public void switchToRed(TrafficLight light) {
        System.out.println("绿灯不能切换为红灯");
    }
}
